import request from '@/utils/requestPro';

/**
 * 获取结算申请基础信息
 * @param params
 */
export function getBaseManageApi(params) {
	return request({
		url: `/admin/merchant/finance/closing/base/info`,
		method: 'get',
		params,
	});
}

/**
 * 日帐单管理分页列表
 * @param params
 */
export function getDayListApi(params) {
	return request({
		url: `/admin/merchant/finance/daily/statement/list`,
		method: 'get',
		params,
	});
}

// 月帐单管理分页列表
export function getMonthListApi(params) {
	return request({
		url: `/admin/merchant/finance/month/statement/list`,
		method: 'get',
		params,
	});
}

// 结算记录分页列表
export function getClosingListApi(params) {
	return request({
		url: `/admin/merchant/finance/closing/record/list`,
		method: 'get',
		params,
	});
}

// 结算记录--详情
export function getClosingDetailApi(closingNo) {
	return request({
		url: `/admin/merchant/finance/closing/record/detail/${closingNo}`,
		method: 'get',
	});
}


// 结算申请
export function toApplyClosingApi(data) {
	return request({
		url: `/admin/merchant/finance/closing/apply`,
		method: 'post',
		data
	});
}

// 资金流水--分页列表
export function getFundsFlowApi(params) {
	return request({
		url: `/admin/merchant/finance/funds/flow`,
		method: 'get',
		params
	});
}

// 获取商户端结算信息
export function getSettlementApi() {
	return request({
		url: `/admin/merchant/settlement/info`,
		method: 'get',
	});
}

// 结算信息----编辑
export function updateSettlementEditApi(data) {
	return request({
		url: `/admin/merchant/settlement/info/edit`,
		method: 'post',
		data
	});
}